using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;

namespace HengTong.Model.Db.Article;

/// <summary>
/// 文章标签实体类
/// </summary>
public class SysArticleTag : BasePoco
{
    [Required]
    [Display(Name = "标签名称", Description = "标签名称", GroupName = "基本信息")]
    [StringLength(64)]
    public string TagName { get; set; }

    [Display(Name = "标签编码", Description = "标签编码，用于系统内部标识", GroupName = "基本信息")]
    [StringLength(64)]
    public string TagCode { get; set; }

    [Display(Name = "标签描述", Description = "标签的详细描述", GroupName = "基本信息")]
    [StringLength(256)]
    public string Description { get; set; }

    [Display(Name = "标签颜色", Description = "标签显示颜色", GroupName = "显示设置")]
    [StringLength(32)]
    public string Color { get; set; }

    [Display(Name = "排序", Description = "标签显示排序，数值越小越靠前", GroupName = "显示设置")]
    public int? SortOrder { get; set; }

    [Display(Name = "是否启用", Description = "是否启用此标签", GroupName = "状态设置")]
    public bool IsActive { get; set; } = true;
    
    // 导航属性
    [Display(Name = "文章标签关联")]
    public virtual ICollection<SysArticleTagMapping> ArticleTagMappings { get; set; }
} 